package com.shop.loan.model.vo;

import com.shop.loan.proxy.MobileCodeShowProxy;
import lombok.Getter;
import lombok.Setter;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_erupt.Filter;
import xyz.erupt.annotation.sub_erupt.Power;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.annotation.sub_field.sub_edit.Search;
import xyz.erupt.jpa.model.BaseModel;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

@Erupt(
        name = "手机号验证码",
        filter = @Filter("MobileCodeShowVo.id = 0"),
        power = @Power(add = false, delete = false, edit = false, viewDetails = false),
        dataProxy = MobileCodeShowProxy.class
)
@Entity
@Table(name = "s_feedback")
@Getter
@Setter
public class MobileCodeShowVo extends BaseModel {

    @Transient
    @EruptField(
            views = @View(title = "手机号码"),
            edit = @Edit(title = "手机号码", search = @Search)
    )
    private String mobile;


    @Transient
    @EruptField(
            views = @View(title = "验证码")
    )
    private String code;

}
